#ifndef __ARC_CONST_H__
#define __ARC_CONST_H__
#define IDT_AMOUNT              (256)
#define GDT_AMOUNT              (128)
#define CGAMAXBYTES             (4000)
#define CGAMAXCHARACTERS        (2000)
#define CGABYTESNUMBERPERROW    (160)
#define CGAMAXROWNUMBER         (25)
#define CGAMAXCOLUMNNUMBER      (80)
#define CGABYTESPERCHARACTER    (2)
#define PARAMETERSIZE           (32)
#define GDTBegin                (0)
#define GDTKernelCode           (1)
#define GDTKernelData           (2)
#define GDTKernelCGA            (3)
#define GDTTSS                  (4)
#define GDTUsrCode              (5)
#define GDTUsrData              (6)
#define GDTUsrCGA               (7)
#define GDTEnd                  (8)
#define GDTSize                 ((GDTEnd-GDTBegin)*8)
#define GDTSelectorKernelCode   (GDTKernelCode*8)
#define GDTSelectorKernelData   (GDTKernelData*8)
#define KernelCode              (GDTSelectorKernelCode)
#define KernelData              (GDTSelectorKernelData)
#define GDTSelectorIDT          (GDTSelectorKernelCode)
#define GDTSelectorCGA          (GDTKernelCGA*8)
#define GDTSelectorTSS          (GDTTSS*8)
#define GDTSelectorUsrCode      (GDTUsrCode*8+3)
#define GDTSelectorUsrData      (GDTUsrData*8+3)  
#define GDTSelectorUsrCGA       (GDTUsrCGA*8+3)
#define UsrCGA                  (GDTSelectorUsrCGA)
#define UsrCode                 (GDTSelectorUsrCode)
#define UsrData                 (GDTSelectorUsrData)
#define KernelCGA               (GDTSelectorCGA)
#define Kernel_CS               (GDTSelectorKernelCode) 
#define Kernel_DS               (GDTSelectorKernelData)
#define Kernel_SS               (GDTSelectorKernelData)
#define Kernel_ES               (GDTSelectorKernelData)
#define Kernel_GS               (GDTSelectorCGA)
#define ENTER_KERNEL_ESP        (0x200000)
#define IDT_Master8259A_Timer        (0x20)
#define Master8259A_StartVector      (IDT_Master8259A_Timer)
#define IDT_Master8259A_Keyboard     (IDT_Master8259A_Timer+1)
#define IDT_Master8259A_Cascade      (IDT_Master8259A_Timer+2)
#define IDT_Master8259A_SerialPort2  (IDT_Master8259A_Timer+3)
#define IDT_Master8259A_SerialPort1  (IDT_Master8259A_Timer+4)
#define IDT_Master8259A_LPT2         (IDT_Master8259A_Timer+5)
#define IDT_Master8259A_Floppy       (IDT_Master8259A_Timer+6)
#define IDT_Master8259A_LPT1         (IDT_Master8259A_Timer+7)
#define IDT_Slave8259A_RealtimeTimer (0x28)
#define Slave8259A_StartVector       (IDT_Slave8259A_RealtimeTimer)
#define IDT_Slave8259A_Redirect      (IDT_Slave8259A_RealtimeTimer+1)
#define IDT_Slave8259A_Reserved1     (IDT_Slave8259A_RealtimeTimer+2)
#define IDT_Slave8259A_Reserved2     (IDT_Slave8259A_RealtimeTimer+3)
#define IDT_Slave8259A_PS2Mouse      (IDT_Slave8259A_RealtimeTimer+4)
#define IDT_Slave8259A_FPUException  (IDT_Slave8259A_RealtimeTimer+5)
#define IDT_Slave8259A_ATA           (IDT_Slave8259A_RealtimeTimer+6)
#define IDT_Slave8259A_Reserved3     (IDT_Slave8259A_RealtimeTimer+7)
#define IDT_System_Call              (0xFF)
#define MASTER8259ACONTROLPORT       (0x20)
#define MASTER8259ACONTROLMASKPORT   (0x21)
#define SLAVE8259ACONTROLPORT        (0xA0)
#define SLAVE8259ACONTROLMASKPORT    (0xA1)
#define PIT8253MODECONTROLREGISTER   (0x43)
#define PIT8253COUNTER0              (0x40)
#define PIT8253FREQUENCY             (1193180)
#define PIT8253HZ                    (100)

#define ADDRESS_KERNEL_START            (0)
#define ADDRESS_KERNEL_PAGE_BLOCK             (0x600000)
#define ADDRESS_KERNEL_PAGE_BLOCK_FLAG        (0x600000)
#define ADDRESS_KERNEL_MESSAGE_BUFFER  (0x700000)
#define ADDRESS_KERNEL_SIGNAL_BUFFER   (0x700000+0x100000/2)
#define ADDRESS_KERNEL_FILE_BUFFER     (0x800000)
#define ADDRESS_KERNEL_END              (0xA00000)

#define NUMBER_MAX_MEMORY_SECTION      (40)
#define SIZE_PAGE                     (0x1000)
#define ATA_PRIMARY                  (0)
#define ATA_SECONDARY                (1)
#define ADDRESS_PARAMETER_NUMBER_LOADER_TO_KERNEL (0x5000)
#define ADDRESS_PARAMETER_FIRST_PARAMETER         (0x5008)
#define TYPE_PARAMETER_RAMSIZE_LOADER_TO_KERNEL   (1)
#define TYPE_PARAMETER_MEMORYMAP_LOADER_TO_KERNEL (2)
#define TYPE_PARAMETER_KERNELSIZE_LOADER_TO_KERNEL (3)
#define TYPE_PARAMETER_RAM_AVAILABLE              (1)
#endif
